package com.bzchao.wechat.wxopen.msg;

import lombok.Data;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

@Data
@XmlRootElement(name = "xml")
@XmlAccessorType(XmlAccessType.FIELD)
public class TextMessage {

    //这里是该属性需要加<![CDATA[]]>防止转换的注解
    @XmlJavaTypeAdapter(CDataAdapter.class)
    @XmlElement(name = "ToUserName")
    private String ToUserName;

    //这里是该属性需要加<![CDATA[]]>防止转换的注解
    @XmlJavaTypeAdapter(CDataAdapter.class)
    @XmlElement(name = "FromUserName")
    private String FromUserName;

    //这里是该属性需要加<![CDATA[]]>防止转换的注解
    @XmlJavaTypeAdapter(CDataAdapter.class)
    @XmlElement(name = "MsgType")
    private String MsgType;

    //这里是该属性需要加<![CDATA[]]>防止转换的注解
    @XmlJavaTypeAdapter(CDataAdapter.class)
    @XmlElement(name = "Content")
    private String Content;

    //这里是该属性需要加<![CDATA[]]>防止转换的注解
    @XmlJavaTypeAdapter(CDataAdapter.class)
    @XmlElement(name = "MsgId")
    private String MsgId;

    @XmlElement(name = "CreateTime")
    private long CreateTime;

}
